<?php
/**
 * A Standard Error Code for JsonRpc 2.0
 *
 */
class AIS_JsonRpcErrorCode
{
	/**
	 * The Error number
	 *
	 * @var int
	 */
	public $code;
	/**
	 * The Error Message
	 *
	 * @var string
	 */
	public $message;
}
/**
 * All Standard JsonRpc Error Codes
 *
 */
class AIS_JsonRpcErrorCodes
{
	/**
	 * Parse Error
	 *
	 * Invalid JSON. An error occurred on the server while parsing the JSON text.
	 * 
	 * @var AIS_JsonRpcErrorCode
	 */
	public static $parseError;
	/**
	 * Invalid Request
	 * 
	 * The received JSON not a valid JSON-RPC Request.
	 *
	 * @var AIS_JsonRpcErrorCode
	 */
	public static $invalidRequest;
	/**
	 * Method not found
	 * 
	 * The requested remote-procedure does not exist / is not available.
	 *
	 * @var AIS_JsonRpcErrorCode
	 */
	public static $methodNotFound;
	/**
	 * Invalid method parameters.
	 *
	 * @var AIS_JsonRpcErrorCode
	 */
	public static $invalidParams;
	/**
	 * Internal JSON-RPC error.
	 *
	 * @var AIS_JsonRpcErrorCode
	 */
	public static $internalError;
	
	public static $methodException;
}

AIS_JsonRpcErrorCodes::$parseError = new AIS_JsonRpcErrorCode();
AIS_JsonRpcErrorCodes::$parseError->code = -32700;
AIS_JsonRpcErrorCodes::$parseError->message = "Parse Error.";
AIS_JsonRpcErrorCodes::$invalidRequest = new AIS_JsonRpcErrorCode();
AIS_JsonRpcErrorCodes::$invalidRequest->code = -32600;
AIS_JsonRpcErrorCodes::$invalidRequest->message = "Invalid Request.";
AIS_JsonRpcErrorCodes::$invalidParams = new AIS_JsonRpcErrorCode();
AIS_JsonRpcErrorCodes::$invalidParams->code = -32602;
AIS_JsonRpcErrorCodes::$invalidParams->message = "Invalid params.";
AIS_JsonRpcErrorCodes::$methodNotFound = new AIS_JsonRpcErrorCode();
AIS_JsonRpcErrorCodes::$methodNotFound->code = -32601;
AIS_JsonRpcErrorCodes::$methodNotFound->message = "Method not found.";
AIS_JsonRpcErrorCodes::$methodException = new AIS_JsonRpcErrorCode();
AIS_JsonRpcErrorCodes::$methodException->code = 1000;
AIS_JsonRpcErrorCodes::$methodException->message = "Method has thrown an Error";
?>
